<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateConsultaMedicaTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateConsultaMedicaLabel_id}" for="id" />
                    <h:inputText id="id" value="#{consultaMedicaController.selected.id}" title="#{bundle.CreateConsultaMedicaTitle_id}" required="true" requiredMessage="#{bundle.CreateConsultaMedicaRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.CreateConsultaMedicaLabel_fecha}" for="fecha" />
                    <h:inputText id="fecha" value="#{consultaMedicaController.selected.fecha}" title="#{bundle.CreateConsultaMedicaTitle_fecha}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateConsultaMedicaLabel_descripcion}" for="descripcion" />
                    <h:inputText id="descripcion" value="#{consultaMedicaController.selected.descripcion}" title="#{bundle.CreateConsultaMedicaTitle_descripcion}" />
                    <h:outputLabel value="#{bundle.CreateConsultaMedicaLabel_receta}" for="receta" />
                    <h:selectOneMenu id="receta" value="#{consultaMedicaController.selected.receta}" title="#{bundle.CreateConsultaMedicaTitle_receta}" >
                        <f:selectItems value="#{recetaController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateConsultaMedicaLabel_paciente}" for="paciente" />
                    <h:selectOneMenu id="paciente" value="#{consultaMedicaController.selected.paciente}" title="#{bundle.CreateConsultaMedicaTitle_paciente}" >
                        <f:selectItems value="#{pacienteController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateConsultaMedicaLabel_medico}" for="medico" />
                    <h:selectOneMenu id="medico" value="#{consultaMedicaController.selected.medico}" title="#{bundle.CreateConsultaMedicaTitle_medico}" >
                        <f:selectItems value="#{medicoController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateConsultaMedicaLabel_diagnostico}" for="diagnostico" />
                    <h:selectOneMenu id="diagnostico" value="#{consultaMedicaController.selected.diagnostico}" title="#{bundle.CreateConsultaMedicaTitle_diagnostico}" >
                        <f:selectItems value="#{diagnosticoController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateConsultaMedicaLabel_cita}" for="cita" />
                    <h:selectOneMenu id="cita" value="#{consultaMedicaController.selected.cita}" title="#{bundle.CreateConsultaMedicaTitle_cita}" >
                        <f:selectItems value="#{citaController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{consultaMedicaController.create}" value="#{bundle.CreateConsultaMedicaSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{consultaMedicaController.prepareList}" value="#{bundle.CreateConsultaMedicaShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.CreateConsultaMedicaIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
